using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NodeBasedSkillEditor.Model.Node
{
    [Node(Category = DAGHelper.CateName_Math, Name = "Rescale")]
    public class Node_Rescale : NodeData
    {
        [Port(IOType = EPortIOType.Input)]
        public FloatPort Value = new FloatPort();

        [Port(IOType = EPortIOType.Input)]
        public FloatPort Start = new FloatPort(0);

        [Port(IOType = EPortIOType.Input)]
        public FloatPort End = new FloatPort(1);

        [Port(IOType = EPortIOType.Input)]
        public FloatPort NewStart = new FloatPort(0);

        [Port(IOType = EPortIOType.Input)]
        public FloatPort NewEnd = new FloatPort(1);

        [Port(IOType = EPortIOType.Input)]
        public BooleanPort Clamp = new BooleanPort();

        [Port(IOType = EPortIOType.Output)]
        public FloatPort Result = new FloatPort();

        public override RT_Node BuildRuntimeNode(RT_DAG parentDAG)
        {
            return new RT.Node_Rescale_RT(this, parentDAG);
        }
    }
}
